package net.wanho.zaixian.course.controller;


import net.wanho.zaixian.course.service.SysDictService;
import net.wanho.zaixian.pojo.system.SysDict;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class GradeController {

    @Resource
    private SysDictService sysDictService;

    @GetMapping("/sys/dictionary/get/{dType}")
    public List<SysDict> getGrade(@PathVariable(name = "dType") String dType){
        List<SysDict> allGrade = sysDictService.getAllGrade(dType);
        System.out.println(allGrade);
        return allGrade;
    }

}
